package com.foreknow.elm.dao;

import com.foreknow.elm.po.Orders;

import java.util.List;

public interface OrdersDao {
    /**
     * 保存订单
     * @param orders
     * @return
     * @throws Exception
     */
    public int saveOrders(Orders orders) throws Exception;

    /**
     * 根据订单id查询某个订单信息
     * @param orderId
     * @return
     * @throws Exception
     */
    public Orders getOrdersById(Integer orderId) throws Exception;

    /**
     * 根据用户的id查询订单列表
     * @return
     * @throws Exception
     */
    public List<Orders> listOrdersByUserId(String userId) throws Exception;

}
